<html xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>errors
          (Stripes 1.5.6 Tag Library Documentation)
        </title>
<meta name="keywords" content="$title">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<script>
            function asd()
            {
            parent.document.title="errors (Stripes 1.5.6 Tag Library Documentation)";
            }
          </script>
<body bgcolor="white" onload="asd();">
<a name="navbar_top"></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td COLSPAN="3" BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><a NAME="navbar_top_firstrow"></a>
<table BORDER="0" CELLPADDING="0" CELLSPACING="3">
<tr ALIGN="center" VALIGN="top">
<td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="../overview-summary.html"><font CLASS="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="tld-summary.html"><font CLASS="NavBarFont1"><b>Library</b></font></a>&nbsp;</td><td BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<font CLASS="NavBarFont1Rev">&nbsp;Tag&nbsp;</font>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a HREF="../help-doc.html"><font CLASS="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</table>
</td><td ALIGN="right" VALIGN="top" ROWSPAN="3"><em></em></td>
</tr>
<tr>
<td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2"></font></td><td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2">
                &nbsp;<a HREF="../index.html" TARGET="_top"><b>FRAMES</b></a>&nbsp;
                &nbsp;<a href="errors.html" target="_top"><b>NO FRAMES</b></a>&nbsp;
                <script></script>
<noscript>
<a HREF="../alltags-noframe.html" TARGET=""><b>All Tags</b></a>
</noscript>
</font></td>
</tr>
</table>
<hr>
<h2>
<font size="-1">Stripes Tag Library</font>
<br>
            Tag errors</h2>
<hr>
            <p>The errors tag has two modes, one where it displays all validation errors in a list
            and a second mode when there is a single enclosed field-error tag that has no name attribute
            in which case this tag iterates over the body, displaying each error in turn in place
            of the field-error tag.</p>

            <p>In the first mode, where the default output is used, it is possible to change the output
            for the entire application using a set of resources in the error messages bundle
            (StripesResources.properties unless you have configured another).  If the properties are
            undefined, the tag will output the text "Validation Errors" in a div with css class errorHeader,
            then output an unordered list of error messages.  The following four resource strings
            (shown with their default values) can be modified to create different default ouput:</p>

            <ul>
              <li>stripes.errors.header=&lt;div class="errorHeader"&gt;Validation Errors&lt;/div&gt;&lt;ul&gt;</li>
              <li>stripes.errors.footer=&lt;/ul&gt;</li>
              <li>stripes.errors.beforeError=&lt;li&gt;</li>
              <li>stripes.errors.afterError=&lt;/li&gt;</li>
            </ul>

            <p>The second mode allows customization of the output for a specific page by nesting
            the following tag inside the errors tag: &lt;stripes:individual-error&gt;,
            &lt;stripes:error-header&gt; and &lt;stripes:error-footer&gt;. An example, re-creating
            the default output using this technique follows:</p>

<pre>&lt;stripes:errors&gt;
     &lt;stripes:errors-header&gt;&lt;div class=&quot;errorHeader&quot;&gt;Validation Errors&lt;/div&gt;&lt;ul&gt;&lt;/stripes:errors-header&gt;
     &lt;li&gt;&lt;stripes:individual-error/&gt;&lt;/li&gt;
     &lt;stripes:errors-footer&gt;&lt;/ul&gt;&lt;/stripes:errors-footer&gt;
&lt;/stripes:errors&gt;
</pre>

            <p>The errors tag can be used to display errors for a single field by supplying it
            with a 'field' attribute which matches the name of a field on the page. In this case the tag
            will display only if errors exist for the named field.  In this mode the tag will first look for
            resources named:</p>

            <ul>
              <li>stripes.fieldErrors.header</li>
              <li>stripes.fieldErrors.footer</li>
              <li>stripes.fieldErrors.beforeError</li>
              <li>stripes.fieldErrors.afterError</li>
            </ul>

            <p>If the <tt>fieldErrors</tt> resources cannot be found, the tag will default to using the
            sames resources and defaults as when displaying for all fields.</p>

            <p>Similar to the above, field specific, manner of display the errors tag can also be used
            to output only errors not associated with a field, i.e. global errors.  This is done by setting
            the <tt>globalErrorsOnly</tt> attribute to true.</p>

            <p>This tag has several ways of being attached to the errors of a specific action request.
            If the tag is inside a form tag, it will display only errors that are associated
            with that form. If supplied with an 'action' attribute, it will display errors only errors
            associated with a request to that URL. Finally, if neither is the case, it will display
            errors associated with the action bean for the current request.</p>

        <br>
<p></p>
<hr>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="2"><font size="+2"><b>Tag Information</b></font></td>
</tr>
<tr>
<td>Tag Class</td><td>net.sourceforge.stripes.tag.ErrorsTag</td>
</tr>
<tr>
<td>TagExtraInfo Class</td><td>net.sourceforge.stripes.tag.ErrorsTagExtraInfo</td>
</tr>
<tr>
<td>Body Content</td><td>JSP</td>
</tr>
<tr>
<td>Display Name</td><td>errors</td>
</tr>
</table>
<br>
<p></p>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="5"><font size="+2"><b>Attributes</b></font></td>
</tr>
<tr>
<td><b>Name</b></td><td><b>Required</b></td><td><b>Request-time</b></td><td><b>Type</b></td><td><b>Description</b></td>
</tr>
<tr valign="top">
<td>action</td><td>false</td><td>true</td><td><code>java.lang.String</code></td><td>
                If supplied, the errors tag will only output errors for a form that posted to the
                supplied action path. Can be used when there are multiple forms on the page and
                you wish to display errors in different places for each form, but not necessarily
                inside of the form tags.
            </td>
</tr>
<tr valign="top">
<td>beanclass</td><td>false</td><td>true</td><td><code>java.lang.Object</code></td><td>
                The fully qualified name of an ActionBean class, or alternatively a Class instance
                for an ActionBean class.  An alternative to the 'action' attribute, the 'beanclass'
                attribute will generate an action appropriate for the ActionBean identified. Note
                that if an "ActionBean" that does not yet exist is identified an exception will
                be thrown!
            </td>
</tr>
<tr valign="top">
<td>field</td><td>false</td><td>true</td><td><code>java.lang.String</code></td><td>
                If supplied, the errors tag will only output errors associated with the
                named field.
            </td>
</tr>
<tr valign="top">
<td>globalErrorsOnly</td><td>false</td><td>true</td><td><code>java.lang.String</code></td><td>
                If set to true then the tag will display only errors that are not directly
                associated with a field, i.e. global errors.
            </td>
</tr>
</table>
<br>
<p></p>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan="5"><font size="+2"><b>Variables</b></font></td>
</tr>
<td colspan="2"><i>No Variables Defined.</i></td>
</table>
<br>
<p></p>
<a name="navbar_bottom"></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td COLSPAN="3" BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><a NAME="navbar_bottom_firstrow"></a>
<table BORDER="0" CELLPADDING="0" CELLSPACING="3">
<tr ALIGN="center" VALIGN="top">
<td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="../overview-summary.html"><font CLASS="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a href="tld-summary.html"><font CLASS="NavBarFont1"><b>Library</b></font></a>&nbsp;</td><td BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<font CLASS="NavBarFont1Rev">&nbsp;Tag&nbsp;</font>&nbsp;</td><td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;<a HREF="../help-doc.html"><font CLASS="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
</tr>
</table>
</td><td ALIGN="right" VALIGN="top" ROWSPAN="3"><em></em></td>
</tr>
<tr>
<td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2"></font></td><td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2">
                &nbsp;<a HREF="../index.html" TARGET="_top"><b>FRAMES</b></a>&nbsp;
                &nbsp;<a href="errors.html" target="_top"><b>NO FRAMES</b></a>&nbsp;
                <script></script>
<noscript>
<a HREF="../alltags-noframe.html" TARGET=""><b>All Tags</b></a>
</noscript>
</font></td>
</tr>
</table>
<hr>
<small><i>
            Output Generated by 
            <a href="http://taglibrarydoc.dev.java.net/" target="_blank">Tag Library Documentation Generator</a>.
            Java, JSP, and JavaServer Pages are trademarks or 
            registered trademarks of Sun Microsystems, Inc. in the US and other
            countries.  Copyright 2002-4 Sun Microsystems, Inc.
            4150 Network Circle
            Santa Clara, CA 95054, U.S.A.
            All Rights Reserved. 
            </i></small>
</body>
</html>
